﻿using DbDiff.Common.Helper;
using DbDiff.WinClient.Forms.DbItems;

namespace DbDiff.WinClient.BusinessObjects
{
    public class TagInfo2
    {
        /// <summary>
        /// Betöltötte-e már a node elemeit
        /// Ha false, nem kell ujratölteni
        /// </summary>
        public bool IsLoaded;
        /// <summary>
        /// A node tag-ben tárolt elem típusának leírója
        /// </summary>
        public DatabaseObjectTypes NodeType;

        /// <summary>
        /// A node tag-ben tárolt objektum referencia
        /// </summary>
        public object Item;
        /// <summary>
        /// A kapcsolódó usercontrol referencia
        /// </summary>
        public UcDbItemBase View;

        public bool IsLeaf;
        /// <summary>
        /// Creates a new <see cref="TagInfo"/> instance.
        /// </summary>
        public TagInfo2(DatabaseObjectTypes nodeType, object item, UcDbItemBase view)
        {
            IsLoaded = true;
            NodeType = nodeType;
            Item = item;
            View = view;
            IsLeaf = false;
        }
        /// <summary>
        /// Creates a new <see cref="TagInfo"/> instance.
        /// </summary>
        public TagInfo2(DatabaseObjectTypes nodeType, object item, UcDbItemBase view, bool isLeaf)
        {
            IsLoaded = true;
            NodeType = nodeType;
            Item = item;
            View = view;
            IsLeaf = isLeaf;
        }
    }
}